Rules for integrands of the form(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)

1:  ∫(x^m) (Subscript[P, q])[(x^2)] (((a+b (x^2)))^p)dx  when ((m-1)/2)∈ℤ

Derivation: Integration by substitution

Basis: If ((m-1)/2)∈ℤ, then (x^m)F[(x^2)]==(1/2) Subst[(x^((m-1)/2)) F[x],x,(x^2)] (∂_x)(x^2)

Rule 1.1.2.y.1: If ((m-1)/2)∈ℤ, then

∫(x^m) (Subscript[P, q])[(x^2)] (((a+b (x^2)))^p)dx  ⟶  (1/2) Subst[∫(x^((m-1)/2)) (Subscript[P, q])[x] (((a+b x))^p)dx,x,(x^2)]

Program code:

Int[x_^m_.*Pq_*(a_+b_.*x_^2)^p_.,x_Symbol] :=
  1/2*Subst[Int[x^((m-1)/2)*SubstFor[x^2,Pq,x]*(a+b*x)^p,x],x,x^2] /;
FreeQ[{a,b,p},x] && PolyQ[Pq,x^2] && IntegerQ[(m-1)/2]

2:  ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  when (Subscript[P, q])[x,0]==0

Derivation: Algebraic simplification

Rule 1.1.2.y.2: If  (Subscript[P, q])[x,0]==0, then

∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  ⟶  (1/c) ∫(((c x))^(m+1)) PolynomialQuotient[(Subscript[P, q])[x],x,x] (((a+b (x^2)))^p)dx

Program code:

Int[(c_.*x_)^m_.*Pq_*(a_+b_.*x_^2)^p_.,x_Symbol] :=
  1/c*Int[(c*x)^(m+1)*PolynomialQuotient[Pq,x,x]*(a+b*x^2)^p,x] /;
FreeQ[{a,b,c,m,p},x] && PolyQ[Pq,x] && EqQ[Coeff[Pq,x,0],0]

3:  ∫(((c x))^m) (((a+b (x^2)))^p) (f+h (x^2))dx when  a h (m+1)-b f (m+2 p+3)==0 ∧ m≠-1

Derivation: Special case of one step of the Ostrogradskiy-Hermite integration method

Rule 1.1.2.y.3: If  a h (m+1)-b f (m+2 p+3)==0 ∧ m≠-1, then

∫(((c x))^m) (((a+b (x^2)))^p) (f+h (x^2))dx  ⟶  ((f (((c x))^(m+1)) (((a+b (x^2)))^(p+1)))/(a c (m+1)))

Program code:

Int[(c_.*x_)^m_.*P2_*(a_+b_.*x_^2)^p_.,x_Symbol] :=
  With[{f=Coeff[P2,x,0],g=Coeff[P2,x,1],h=Coeff[P2,x,2]},
  h*(c*x)^(m+1)*(a+b*x^2)^(p+1)/(b*c*(m+2*p+3)) /;
 EqQ[g,0] && EqQ[a*h*(m+1)-b*f*(m+2*p+3),0]] /;
FreeQ[{a,b,c,m,p},x] && PolyQ[P2,x,2] && NeQ[m,-1]

4:  ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  when p+2∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule 1.1.2.y.4: If  p+2∈(SuperPlus[ℤ]), then

∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  ⟶  ∫ ExpandIntegrand[(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p),x]dx

Program code:

Int[(c_.*x_)^m_.*Pq_*(a_+b_.*x_^2)^p_.,x_Symbol] :=
  Int[ExpandIntegrand[(c*x)^m*Pq*(a+b*x^2)^p,x],x] /;
FreeQ[{a,b,c,m},x] && PolyQ[Pq,x] && IGtQ[p,-2]

5:  ∫(x^m) (Subscript[P, q])[(x^2)] (((a+b (x^2)))^p)dx  when (m/2)∈ℤ ∧ ((m+1)/2)+p∈(SuperMinus[ℤ])∧ m+2 q+2 p+1<0

Derivation: Algebraic expansion and binomial recurrence 3b

Basis: ∫(x^m) (((a+b (x^2)))^p)dx==(((x^(m+1)) (((a+b (x^2)))^(p+1)))/(a (m+1)))-((b (m+2 (p+1)+1))/(a (m+1))) ∫(x^(m+2)) (((a+b (x^2)))^p)dx

Note: Interestingly this rule eleminates the constant term of (Subscript[P, q])[(x^2)] rather than the highest degree term.

Rule 1.1.2.y.5: If (m/2)∈ℤ ∧ ((m+1)/2)+p∈(SuperMinus[ℤ])∧ m+2 q+2 p+1<0, let A->(Subscript[P, q])[(x^2),0] and (Subscript[Q, q-1])[(x^2)]->PolynomialQuotient[(Subscript[P, q])[(x^2)]-A,(x^2),x], then

∫(x^m) (Subscript[P, q])[(x^2)] (((a+b (x^2)))^p)dx  ⟶  

A ∫(x^m) (((a+b (x^2)))^p)dx+∫(x^(m+2)) (Subscript[Q, q-1])[(x^2)] (((a+b (x^2)))^p)dx  ⟶  

((A (x^(m+1)) (((a+b (x^2)))^(p+1)))/(a (m+1)))+ (1/(a (m+1)))∫(x^(m+2)) (((a+b (x^2)))^p) (a (m+1) (Subscript[Q, q-1])[(x^2)]-A b (m+2 (p+1)+1))dx

Program code:

Int[x_^m_*Pq_*(a_+b_.*x_^2)^p_,x_Symbol] :=
  With[{A=Coeff[Pq,x,0],Q=PolynomialQuotient[Pq-Coeff[Pq,x,0],x^2,x]},
  A*x^(m+1)*(a+b*x^2)^(p+1)/(a*(m+1)) + 1/(a*(m+1))*Int[x^(m+2)*(a+b*x^2)^p*(a*(m+1)*Q-A*b*(m+2*(p+1)+1)),x]] /;
FreeQ[{a,b},x] && PolyQ[Pq,x^2] && IntegerQ[m/2] && ILtQ[(m+1)/2+p,0] && LtQ[m+Expon[Pq,x]+2*p+1,0]

6.  ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  when p<-1

1:  ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  when p<-1 ∧ m>0

Derivation: Algebraic expansion and quadratic recurrence 2a

Rule 1.1.2.y.6.1: If  p<-1 ∧ m>0, 
    let (Subscript[Q, q-2])[x]->PolynomialQuotient[(Subscript[P, q])[x],a+b (x^2),x] and f+g x->PolynomialRemainder[(Subscript[P, q])[x],a+b (x^2),x], then

∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  ⟶  

∫(((c x))^m) (f+g x) (((a+b (x^2)))^p)dx+∫(((c x))^(m-1)) (c x) (Subscript[Q, q-2])[x] (((a+b (x^2)))^(p+1))dx  ⟶  

(((((c x))^m) (((a+b (x^2)))^(p+1)) (a g-b f x))/(2 a b (p+1)))+(c/(2 a b (p+1))) ∫(((c x))^(m-1)) (((a+b (x^2)))^(p+1))(2 a b (p+1) x (Subscript[Q, -2+q])[x]-a g m+b f (m+2 p+3) x) dx

Program code:

Int[(c_.*x_)^m_.*Pq_*(a_+b_.*x_^2)^p_,x_Symbol] :=
  With[{Q=PolynomialQuotient[Pq,a+b*x^2,x],
        f=Coeff[PolynomialRemainder[Pq,a+b*x^2,x],x,0],
        g=Coeff[PolynomialRemainder[Pq,a+b*x^2,x],x,1]},
  (c*x)^m*(a+b*x^2)^(p+1)*(a*g-b*f*x)/(2*a*b*(p+1)) + 
  c/(2*a*b*(p+1))*Int[(c*x)^(m-1)*(a+b*x^2)^(p+1)*ExpandToSum[2*a*b*(p+1)*x*Q-a*g*m+b*f*(m+2*p+3)*x,x],x]] /;
FreeQ[{a,b,c},x] && PolyQ[Pq,x] && LtQ[p,-1] && GtQ[m,0]

2.  ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  when p<-1 ∧ m≯0

1:  ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  when p<-1 ∧ m∈(SuperMinus[ℤ])

Derivation: Algebraic expansion and trinomial recurrence 2b

Rule 1.1.2.y.6.2.1: If  p<-1 ∧ m∈(SuperMinus[ℤ]), 
    let (Subscript[Q, m+q-2])[x]->PolynomialQuotient[(((c x))^m) (Subscript[P, q])[x],a+b (x^2),x]and f+g x->PolynomialRemainder[(((c x))^m) (Subscript[P, q])[x],a+b (x^2),x], then

∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  ⟶  

∫(f+g x) (((a+b (x^2)))^p)dx+∫(Subscript[Q, m+q-2])[x] (((a+b (x^2)))^(p+1))dx  ⟶  

(( (a g-b f x)(((a+b (x^2)))^(p+1)))/(2 a b (p+1)))+(1/(2 a (p+1)))∫(((c x))^m) (((a+b (x^2)))^(p+1))(2 a (p+1) (((c x))^(-m)) (Subscript[Q, m+q-2])[x]+f (2 p+3) (((c x))^(-m))) dx

Program code:

Int[(c_.*x_)^m_.*Pq_*(a_+b_.*x_^2)^p_,x_Symbol] :=
  With[{Q=PolynomialQuotient[(c*x)^m*Pq,a+b*x^2,x],
        f=Coeff[PolynomialRemainder[(c*x)^m*Pq,a+b*x^2,x],x,0],
        g=Coeff[PolynomialRemainder[(c*x)^m*Pq,a+b*x^2,x],x,1]},
  (a*g-b*f*x)*(a+b*x^2)^(p+1)/(2*a*b*(p+1)) + 
  1/(2*a*(p+1))*Int[(c*x)^m*(a+b*x^2)^(p+1)*ExpandToSum[2*a*(p+1)*(c*x)^(-m)*Q+f*(2*p+3)*(c*x)^(-m),x],x]] /;
FreeQ[{a,b,c},x] && PolyQ[Pq,x] && LtQ[p,-1] && ILtQ[m,0]

2:  ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  when p<-1 ∧ m≯0

Derivation: Algebraic expansion and quadratic recurrence 2b

Rule 1.1.2.y.6.2.2: If  p<-1 ∧ m≯0, 
    let (Subscript[Q, q-2])[x]->PolynomialQuotient[(Subscript[P, q])[x],a+b (x^2),x] and f+g x->PolynomialRemainder[(Subscript[P, q])[x],a+b (x^2),x], then

∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  ⟶  

∫(((c x))^m) (f+g x) (((a+b (x^2)))^p)dx+∫(((c x))^m) (Subscript[Q, q-2])[x] (((a+b (x^2)))^(p+1))dx  ⟶  

-(((((c x))^(m+1)) (f+g x) (((a+b (x^2)))^(p+1)))/(2 a c (p+1)))+(1/(2 a (p+1))) ∫(((c x))^m) (((a+b (x^2)))^(p+1))(2 a (p+1) (Subscript[Q, q-2])[x]+f (m+2 p+3)+g (m+2p+4) x) dx

Program code:

Int[(c_.*x_)^m_.*Pq_*(a_+b_.*x_^2)^p_,x_Symbol] :=
  With[{Q=PolynomialQuotient[Pq,a+b*x^2,x],
        f=Coeff[PolynomialRemainder[Pq,a+b*x^2,x],x,0],
        g=Coeff[PolynomialRemainder[Pq,a+b*x^2,x],x,1]},
  -(c*x)^(m+1)*(f+g*x)*(a+b*x^2)^(p+1)/(2*a*c*(p+1)) + 
  1/(2*a*(p+1))*Int[(c*x)^m*(a+b*x^2)^(p+1)*ExpandToSum[2*a*(p+1)*Q+f*(m+2*p+3)+g*(m+2*p+4)*x,x],x]] /;
FreeQ[{a,b,c,m},x] && PolyQ[Pq,x] && LtQ[p,-1] && Not[GtQ[m,0]]

7:  ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  when m<-1

Derivation: Algebraic expansion and quadratic recurrence 3b

Note: If q==1, no need to reduce integrand since ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx can be expressed as a two term sum of hyperbolic functions.

Rule 1.1.2.y.7: If  m<-1, 
    let (Subscript[Q, q-1])[x]->PolynomialQuotient[(Subscript[P, q])[x],c x,x]and R->PolynomialRemainder[(Subscript[P, q])[x],c x,x], then

∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  ⟶  

∫(((c x))^(m+1)) (Subscript[Q, q-1])[x] (((a+b (x^2)))^p)dx+R ∫(((c x))^m)(((a+b (x^2)))^p)dx  ⟶  

((R (((c x))^(m+1)) (((a+b (x^2)))^(p+1)))/(a c (m+1)))+(1/(a c (m+1))) ∫(((c x))^(m+1)) (((a+b (x^2)))^p)(a c (m+1) (Subscript[Q, q-1])[x]-b R (m+2 p+3) x)dx

Program code:

Int[(c_.*x_)^m_*Pq_*(a_+b_.*x_^2)^p_,x_Symbol] :=
  With[{Q=PolynomialQuotient[Pq,c*x,x], R=PolynomialRemainder[Pq,c*x,x]},
  R*(c*x)^(m+1)*(a+b*x^2)^(p+1)/(a*c*(m+1)) + 
  1/(a*c*(m+1))*Int[(c*x)^(m+1)*(a+b*x^2)^p*ExpandToSum[a*c*(m+1)*Q-b*R*(m+2*p+3)*x,x],x]] /;
FreeQ[{a,b,c,p},x] && PolyQ[Pq,x] && LtQ[m,-1] && (IntegerQ[2*p] || NeQ[Expon[Pq,x],1])

8:  ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  when m+q+2 p+1==0

Derivation: Algebraic expansion

Basis: (((c x))^m) (Subscript[P, q])[x]==(((Subscript[P, q])[x,q] (((c x))^(m+q)))/(c^q))+(((((c x))^m) ((c^q) (Subscript[P, q])[x]-(Subscript[P, q])[x,q] (((c x))^q)))/(c^q))

Rule 1.1.2.y.8: If  m+q+2 p+1==0, then

∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  ⟶  
(((Subscript[P, q])[x,q])/(c^q))∫(((c x))^(m+q)) (((a+b (x^2)))^p)dx+(1/(c^q))∫(((c x))^m) (((a+b (x^2)))^p)((c^q) (Subscript[P, q])[x]-(Subscript[P, q])[x,q] (((c x))^q))dx

Program code:

Int[(c_.*x_)^m_.*Pq_*(a_+b_.*x_^2)^p_.,x_Symbol] :=
  With[{q=Expon[Pq,x]},
  Coeff[Pq,x,q]/c^q*Int[(c*x)^(m+q)*(a+b*x^2)^p,x] + 
  1/c^q*Int[(c*x)^m*(a+b*x^2)^p*ExpandToSum[c^q*Pq-Coeff[Pq,x,q]*(c*x)^q,x],x] /;
 EqQ[q,1] || EqQ[m+q+2*p+1,0]] /;
FreeQ[{a,b,c,m,p},x] && PolyQ[Pq,x] && Not[IGtQ[m,0] && ILtQ[p+1/2,0]]

9:  ∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  when q>1 ∧ m+q+2 p+1≠0 ∧ (m∉(SuperPlus[ℤ])∨ p+(1/2)+1∈(SuperPlus[ℤ]))

Derivation: Algebraic expansion and quadratic recurrence 3a with A=d, B=e and m=m-1

Rule 1.1.2.y.9: If  q>1 ∧ m+q+2 p+1≠0 ∧ (m∉(SuperPlus[ℤ])∨ p+(1/2)+1∈(SuperPlus[ℤ])), let f->(Subscript[P, q])[x,q], then

∫(((c x))^m) (Subscript[P, q])[x] (((a+b (x^2)))^p)dx  ⟶  

∫(((c x))^m) ((Subscript[P, q])[x]-(f/(c^q)) (((c x))^q)) (((a+b (x^2)))^p)dx+(f/(c^q)) ∫(((c x))^(m+q)) (((a+b (x^2)))^p)dx  ⟶  

((f (((c x))^(m+q-1)) (((a+b (x^2)))^(p+1)))/(b (c^(q-1)) (m+q+2 p+1)))+
(1/(b (m+q+2 p+1))) ∫(((c x))^m) (((a+b (x^2)))^p) (b (m+q+2 p+1) (Subscript[P, q])[x]-b f (m+q+2 p+1) (x^q)-a f (m+q-1) (x^(q-2)))dx

Program code:

Int[(c_.*x_)^m_.*Pq_*(a_+b_.*x_^2)^p_,x_Symbol] :=
  With[{q=Expon[Pq,x],f=Coeff[Pq,x,Expon[Pq,x]]},
  f*(c*x)^(m+q-1)*(a+b*x^2)^(p+1)/(b*c^(q-1)*(m+q+2*p+1)) + 
  1/(b*(m+q+2*p+1))*Int[(c*x)^m*(a+b*x^2)^p*ExpandToSum[b*(m+q+2*p+1)*Pq-b*f*(m+q+2*p+1)*x^q-a*f*(m+q-1)*x^(q-2),x],x] /;
 GtQ[q,1] && NeQ[m+q+2*p+1,0]] /;
FreeQ[{a,b,c,m,p},x] && PolyQ[Pq,x] && (Not[IGtQ[m,0]] || IGtQ[p+1/2,-1])